<?php
	//引入模板引擎
	require 'MiniSmarty.class.php';
	//实例化模板类
	$minismarty = new MiniSmarty();
	//缓存开关
	$minismarty->caching = false;
	
	//定义变量
	$webname = '迷你版Smarty测试';
	$author = '王正';
	$title = '这是一个测试标题';
	$content = '这是一段测试内容';
	
	//注入变量
	$minismarty->assign('webname', $webname);
	$minismarty->assign('author', $author);
	$minismarty->assign('title', $title);
	$minismarty->assign('content', $content);

	//启动编译模板文件
	$minismarty->display('demo.tpl');
?>















<!--<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title><?php echo $minismarty->_tpl_var["webname"]?></title>
</head>
<body>
<div>
    <h3><?php echo $minismarty->_tpl_var["title"]?> </h3>
    <span>作者：<?php echo $minismarty->_tpl_var["author"]?></span>
    <p>内容：<?php echo $minismarty->_tpl_var["content"]?></p>
</div>
</body>
</html>-->